#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>
#include<assert.h>

char* my_strstr(const char* arr1, const char* arr2)
{
	assert(arr1 && arr2);
	char* s1 = NULL;
	char* s2 = NULL;
	char* p2 = arr2;
	char* start = arr1;
	while (*s2)
	{
		s1 = start;
		s2 = p2;
		while (*s1 && *s2 && *s1 == *s2)
		{
			s1++;
			s2++;
			if (*s2 == '\0')
				return start;
		}
		start++;
	}

	return NULL;
}

int main()
{
	char arr1[10] = "abcdebcddf";
	char arr2[10] = "bcddf";
	printf("%s", my_strstr(arr1, arr2));

	return 0;
}
